#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from socket import socket, AF_INET, SOCK_STREAM


s = socket(AF_INET, SOCK_STREAM)
s.connect(('127.0.0.1', 20000))
while True:
    data = input("Please send msg: ")
    s.send(data.encode('utf-8'))
    resp = s.recv(8192).decode('utf-8')
    print("Got response:", resp)
